import request from '@/utils/request'

// 从配置中获取业务的地址
import { baseUrlConfig } from '@/config/config'
const basePath = baseUrlConfig.businessBaseUrl

export interface PageListType {
    pageNum?: number;
    pageSize?: number;
    condition?:{
        allowEnter?: string,
        areaName?: string,
        columns?: string,
        isEnter?: string,
        id?: number,
        trolleys?: string
    }
  }

// 获取分页列表
export const cartAreaPageList: (data: any) => Promise<[]> = (data) => {
  return request({
    url: basePath + '/cartArea/find/page',
    method: 'post',
    data
  })
}

// 新增
export const cartAreaAdd = (data: any) => {
  return request({
    url: basePath + '/cartArea/append',
    method: 'post',
    data
  })
}

// 删除
export const cartAreaDelete = (data: any) => {
  return request({
    url: basePath + '/cartArea/delete',
    method: 'post',
    data
  })
}

// 修改
export const cartAreaUpdate = (data: any) => {
  return request({
    url: basePath + '/cartArea/update',
    method: 'post',
    data
  })
}
